CSS Outline Width



The outline-width property specifies the width of the outline, and can have one of the following values:

  • thin (typically 1px)
  • medium (typically 3px)
  • thick (typically 5px)
  • A specific size (in px, pt, cm, em, etc)
  • The following example shows some outlines with different widths:

    Example
    
    
          <!DOCTYPE html>
          <html>
          <head> 
          <style> 
    
          p.ex1  {
            border: 1px solid black;
            outline-style:solid;
            outline-color:green;
            outline-width:thin;
    
                }
    
           p.ex2  {
            border: 1px solid black;
            outline-style:solid;
            outline-color:green;
            outline-width:medium;
          
                      }
    
            p.ex3  {
              border: 1px solid black;
              outline-style:solid;
              outline-color:green;
              outline-width:thick;
                      
                                  }
    
            p.ex3  {
              border: 1px solid black;
              outline-style:solid;
              outline-color:green;
              outline-width:4px;
            }              
                                                        
          </style> 
          </head> 
          <body> 
    
          <h2>The outline-width Property</h2>
    
          <p class="ex1">ACADEMY OF INFORMATION TECHNOLOGY.</p>
          <p class="ex2">ACADEMY OF INFORMATION TECHNOLOGY.</p>
          <p class="ex3">ACADEMY OF INFORMATION TECHNOLOGY.</p>
          <p class="ex4">ACADEMY OF INFORMATION TECHNOLOGY.</p>
    
      
              </body>
              </html>
                    
                  
    Result:
    Example Image